<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AlterServiceSubEditSubType extends Migrator
{

    public function change()
    {
        \app\model\ServiceSub::query()
            ->whereIn('serv_type',[6,12,13,14])
            ->select()->each(function (\app\model\ServiceSub $serviceSub){
                $serviceSub->sub_type = \app\model\ServiceSub::SERV_TYPE_INTERFACE_AND_COMMISSION;
                $serviceSub->save();
            });

    }
}